package com.ruoyi.wsy.controller;

import com.ruoyi.wsy.domain.Withdrawal;
import com.ruoyi.wsy.service.WithdrawalService;
import com.ruoyi.wsy.service.impl.WithdrawalServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName WithdrawalController
 * @Description TODO
 * @Author wangshuyu
 * @Date 2025年11月13日 20:02
 * @Version 1.0
 */
@RestController
@RequestMapping("/withdrawal")
public class WithdrawalController {

    @Autowired
    private WithdrawalServiceImpl withdrawalService;

    @GetMapping
    public List<Withdrawal> getList(Integer mId){
        return withdrawalService.getList(mId);
    }

    // 新增插入接口
    @PostMapping
    public int insert(@RequestBody Withdrawal withdrawal){
        return withdrawalService.insert(withdrawal);
    }


}
